package com.qd.common.sys.constant;

/**
 * 通用常量信息
 *
 * @author sjk
 */
public class Constants {
    private Constants() {

    }

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes_";

    /**
     * 登录用户 redis key，key为token，值为登录信息
     */
    public static final String LOGIN_TOKEN_KEY = "tokens_";

    /**
     * 登录用户 redis key，key为用户id，值为token
     */
    public static final String LOGIN_USERID_KEY = "userIds_userId_{0}_remote_{1}";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = "sub";

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    public static final String DEFAULT_TREE_PARENT_ID = "0";
    public static final String PARENT_ID = "parent_id";
    public static final String USER_ID = "user_id";
    public static final String PERSON_ID = "person_id";
    public static final String ROLE_ID = "role_id";
    public static final String MENU_ID = "menu_id";
    public static final String ORG_ID = "org_id";
    public static final String OPENID = "openid";
    public static final String APPID = "appid";

    public static final String DEFAULT_USER_PASSWORD = "123456";

    public static final String ADMIN_DEFAULT_ID = "88888888";

    /**
     * 状态 0启用 1停用
     */
    public static final int STATUS_ENABLE = 0;
    public static final int STATUS_DISABLE = 1;

    public static final String STATUS_ENABLE_VALUE = "启用";
    public static final String STATUS_DISABLE_VALUE = "停用";


    /**
     * 系统设置
     * SYSTEM_RADIUS 设置半径
     */
    public static final String SYSTEM_RADIUS = "RADIUS";
    /**
     * 系统设置
     * SYSTEM_OIL_PRICE 油价
     */
    public static final String SYSTEM_OIL_PRICE = "OIL_PRICE";
}
